<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // function changNum(num1, num2) {
    //   return [num2, num1]
    // }
    // let re = changNum(1, 2)
    // document.write(re)

    function changNum(x, y) {
      let temp = x
      x = y
      y = temp
      document.write(`第一个值结果为${x} <br>第二个值结果为${y}`)
    }
    changNum(3,4)
  </script>
</body>
</html>